package main

import (
	"bootstrap/global/log"
	_ "bootstrap/log-zap/zap"
	"fmt"

	"go.uber.org/zap"
)

func main() {
	err := log.InitGlobalLogger("zap")
	if err != nil {
		fmt.Println(err)
		return
	}
	logger := zap.NewExample()
	log.Debug("this is a debug message ", "int?", 123, "float?", 22.33, "bool?", true, "string?", "abcd")
	log.Info("this is a debug message ", "int?", 123, "float?", 22.33, "bool?", true, "string?", "abcd")
	log.Warn("this is a debug message ", "int?", 123, "float?", 22.33, "bool?", true, "string?", "abcd")
	log.Error("this is a debug message ", "int?", 123, "float?", 22.33, "bool?", true, "string?", "abcd")
	logger.Info("--------------------------")
	logger.Debug("this is a debug message ", zap.Int("int?", 123), zap.Float64("float?", 22.33), zap.Bool("bool?", true), zap.String("string?", "abcd"))
	logger.Info("this is a debug message ", zap.Int("int?", 123), zap.Float64("float?", 22.33), zap.Bool("bool?", true), zap.String("string?", "abcd"))
	logger.Warn("this is a debug message ", zap.Int("int?", 123), zap.Float64("float?", 22.33), zap.Bool("bool?", true), zap.String("string?", "abcd"))
	logger.Error("this is a debug message ", zap.Int("int?", 123), zap.Float64("float?", 22.33), zap.Bool("bool?", true), zap.String("string?", "abcd"))
}
